package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 链路视图 实体
 * </p>
 *
 * @author 黄露
 * @since 2021-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "DeviceLink对象", description = "链路视图")
public class DeviceLink extends Model<DeviceLink> {

  private static final long serialVersionUID = 1L;

  @TableId(value = "link_id", type = IdType.AUTO)
  private Integer linkId;

  private Integer groupId;

  // "链路名称")
  private String linkName;
  // "所有设备的id集合")
  private String deviceIds;

  // "部门id")
  private Integer deptId;

  // "链路关系json")
  private String relation;

  // "创建人")
  private String createBy;

  // "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  @Override
  public Serializable pkVal() {
    return this.linkId;
  }

}
